{% extends "base.html" %}

{% block content %}
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<table width='80%' class='grid' cellspacing='1' align='center'><tr><td colspan='10' class='title' align="center">Sales groups list</td></tr>
<tr valign='middle' align='left'></tr>
  <tr valign='middle' align='left'>
  <td class='odd gray' width='10%'>ID</td>
  <td class='even gray' width='20%'>Name</td>
  <td class='even gray' width='20%'>Code</td>
  <td class='even gray' width='20%'>Chinese_Code</td>
  <td class='even gray' width='30%'>
	Action&nbsp;&nbsp;&nbsp;(<a style="color:blue;" href="{% ifequal level 'sales' %}javascript:alert('No Competence');{%else%}/add_g{%endifequal%}">Add new group</a>)
  </td>  

  </tr>
  {% for grouplist in grouplist %}
 
  <tr valign='middle' align='left'>
  <td class='odd'>{{grouplist.id}}</td>
   <td class='even'>{{grouplist.name}}</td>
   <td class='even'>{{grouplist.code}}</td>
   <td class='even'>{{grouplist.chinese}}</td>
	<td class='even blue' >
		<a href="{% ifequal level 'sales' %}javascript:alert('No Competence');{%else%}/edit_g/{{ grouplist.id}}{%endifequal%}">Edit</a>&nbsp;&nbsp;&nbsp;
		<a href="{% ifequal level 'sales' %}javascript:alert('No Competence');{%else%}/del_g/{{ grouplist.id}}{%endifequal%}" onclick="return confirm('Are you sure to delete it?');">Delete</a>&nbsp;&nbsp;&nbsp;
	</td>
  </tr>

  {% endfor %}

      <tr><td  class='even' colspan="10" align="right"><strong>{{ hits }}</strong>&nbsp;Records&nbsp;&nbsp;

</td></tr>
</table>
{% endblock %}
